#pragma once
#include <ilttexturestring.h>
#include <string>
class text
{
public:
	text(uint s=20);
	~text(void);
	//set pos
	inline void set_pos(float x=0.0f,float y=0.0f)
	{
		m_x=x;
		m_y=y;
	}
	//reset font height
	void set_font_hei(uint32 num);
	//load string
	void load_str(const wchar_t* str);
	//render
	void render();
	//get c_str
	const wchar_t* get_cstr();
	//set color
    void set_color(uint32 color=0xFFFFFFFF);
	void set_colors(uint32 a,uint32 r,uint32 g,uint32 b);
   //reset fonts
	static void set_font(const wchar_t* str){text_face=str;}
	//get text tex;
	HTEXTURE get_htex();
	//get length;
	uint32 get_length();
	//get pos;
	float get_x()const{return m_x;} 
	float get_y()const{return m_y;}
private:
	float m_x;
	float m_y;
	HTEXTURESTRING m_p_str;
	CFontInfo m_font_info;
	//strings
	std::wstring m_string;
	uint32 m_color;
	HTEXTURE m_htex;
	static std::wstring text_face;

};
